package File;

import java.io.*;

public class Demo14 {
    public static void main(String[] args) throws FileNotFoundException {
        File file = new File("test1.txt");
        try(OutputStream outputStream = new FileOutputStream(file, true)) {
            outputStream.write('h');
            outputStream.write('e');
            outputStream.write('l');
            outputStream.write('l');
            outputStream.write('o');
            outputStream.flush();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
